package xyz.lisys.taglib;

import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;
import xyz.lisys.taglib.component.HelloComponent;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HelloStruts2Tag extends ComponentTagSupport {

    @Override
    public Component getBean(ValueStack valueStack, HttpServletRequest request, HttpServletResponse response) {
        // 返回标签组件的实例
        return new HelloComponent(valueStack);
    }

    @Override
    protected void populateParams() {
        // 用于填充属性，即：将我们标签中的属性封装到标签类中
        super.populateParams();
    }

}
